<template>
	<view class="Wrapper">
		<view class="d-flex white f-column">
			<text class="size28">{{ title }}</text>
			<view class="white d-flex a-center m-top10">
				<text class="size54">{{ accountInfo.money }}</text>
				<text class="h6 m-top8 m-left10" v-if="Type < 3"></text>
			</view>
		</view>
		<view class="d-flex">
			<view class="Btn btnLine" @click="$pop.toJifen()">积分商城</view>
			<view class="Btn" @click="business">{{ Trading }}</view>
		</view>
	</view>
</template>

<script>
	// Type 1、购买文票 2 余额交易 卖出 3 创业值交易
	export default {
		name: 'accountDeal',
		props: ['Type', 'accountInfo'],
		data() {
			return {};
		},
		methods: {
			business() {
				this.$emit('business');
			},
		},
		computed: {
			title() {
				const obj = {
					1: '兑换积分',
					3: '账户创业值',
				};
				return obj[this.Type];
				// return this.Type < 3 ? '兑换积分' : '账户创业值';
			},
			Trading() {
				return this.Type == 1 ? '兑换仓单' : '卖出';
			},
		},
	};
</script>
<style lang="scss">
	page {
		background-color: $page;
		padding-bottom: 20rpx;
	}
</style>
<style lang="scss" scoped>
	.Wrapper {
		width: 100%;
		padding: 30rpx 40rpx;
		background-color: #333;
		display: flex;
		justify-content: space-between;

		.Btn {
			color: #fff;
			font-size: 26rpx;
			padding: 0 20rpx;
			position: relative;
		}
		.btnLine:before {
			content: '';
			width: 1px;
			height: 20rpx;
			background-color: #fff;
			position: absolute;
			right: 0;
			top: 10rpx;
		}
	}

	.utabs {
		width: 100%;
		padding: 0 30rpx;
		background-color: $page;
	}
</style>
